<template>
	<!-- 首页灵活用工详情页组件 -->
	<view class="main1">
		<u-tabs :list="list" :is-scroll="false" :current="current" @change="change" v-show='xgShow'></u-tabs>
		<view class="geren">
			<view class="info">
				<view class="userInfo">
					<view class="left" v-if="current==0">
						<text class="name">{{grInfo.certName}}</text>
						<view class="ageOrSex">
							<text class="age">{{age}}</text>
							<text class="sex">{{sex}}</text>
						</view>
					</view>

					<view class="right">
						<image v-if="current==0" src="https://recruit-oss.oss-cn-beijing.aliyuncs.com/recruit/img/v1/touxiang.png" mode=""></image>
					</view>
				</view>
				<view class="tel">
					<u-icon class="icon" name="phone-fill" color="#2979ff" size="28"></u-icon>
					<u-input disabled style="margin-left: 20rpx" v-model="value" placeholder="请输入手机号" type="text" />
				</view>
			</view>
			<view class="qzxx">
				<view class="title">
					<u-icon class="icon" name="file-text-fill" color="#2979ff" size="28"></u-icon>
					求职信息
				</view>
				<view class="form">
					<u-form label-width="150" label-align="right"  :model="form"  ref="uForm">
						<u-form-item label="所属企业" prop="stageName">
							<u-input @click="showSelect(1)" input-align="right" v-model="stageName" placeholder="请选择"
								type="select" />
						</u-form-item>

						<u-form-item label="工种类型" prop="workType">
							<u-input input-align="right" @click="selectGz" v-model="form.workType" placeholder="请选择"
								type="select" />
						</u-form-item>

						<u-form-item label="岗位名称"  prop="workName">
							<u-input input-align="right" v-model="form.workName" placeholder="请输入" />
						</u-form-item>
						<u-form-item label="薪资待遇" prop="wages">
							<div class="wagesDiv">
								<u-input input-align="right" v-model="form.price" placeholder="请输入" type="number" />
								<u-input @click="showSelect(7)" input-align="right" v-model="form.unit"
									placeholder="元/天" type="select" />
									<!-- <u-input @click="showSelect(4)" input-align="right" v-model="form.settlement"
										placeholder="请选择" type="select" /> -->
							</div>
								
								
						</u-form-item>
						<u-form-item label="结算方式" prop="settlement">
							<u-input @click="showSelect(4)" input-align="right" v-model="form.settlement"
								placeholder="请选择" type="select" />
						</u-form-item>
						<!-- 增设我是零工-工作经验 -->
						<u-form-item label="工作经验" prop="workExp">
							<u-input @click="showSelect(6)" input-align="right" v-model="form.workExp"
								placeholder="请选择" type="select" />
						</u-form-item>

						
						<u-form-item label="招工人数" v-if="type=='招工'" prop="needNum">
							<u-input input-align="right" v-model="form.needNum" placeholder="请输入" />
						</u-form-item>

						<u-form-item label="所在位置" prop="address">
							<u-input input-align="right" @click="chooseAddress" type="select" placeholder="请选择"
								v-model="form.address" />
						</u-form-item>

						<u-form-item label="岗位有效期" v-if="type=='招工'" prop="expireTime">
							<u-input @click="selectDate" input-align="right" v-model="form.expireTime" placeholder="请选择"
								type="select" />
						</u-form-item>
						<u-form-item :label="type=='求职'?'服务描述':'工作内容'" prop="description">
							<u-input input-align="left" v-model="form.description" placeholder="请输入" type="textarea" />
						</u-form-item>
					</u-form>
				</view>
			</view>
			<view class="qzxx">
				<view class="title">
					<u-icon class="icon" name="plus" color="#2979ff" size="28"></u-icon>
					<text v-if="type=='求职'">零工风采</text>
					<text v-if="type=='招工'">工作环境</text>
				</view>
				<view class="title" style="margin-top: 20rpx;" >
					上传视频，建议上传视频大小不超过200M，时长不超过60秒。

					<!-- 选择视频 -->
					<view class="upload1" @click="uploadVideo" v-show="scShow">
						<image src="https://recruit-oss.oss-cn-beijing.aliyuncs.com/recruit/img/lg/tianj.png" mode=""></image>
						<view class="upText">选择视频</view>
					</view>
					<!-- 展示视频 -->
					<view class="videoVie" v-show="spShow">
						<video :src="form.videoUrl" :show-mute-btn="true" :enable-play-gesture="true"></video>
						<image @click="delVideo" src="https://recruit-oss.oss-cn-beijing.aliyuncs.com/recruit/img/lg/del.png" mode=""></image>
					</view>


				</view>
				<view class="title" style="margin-top: 20rpx;">
					上传图片
					<u-upload upload-text="选择图片" :before-upload="beforeUpload" width="155" multiple :maxCount="5"
						ref="uUpload2" :show-progress="false" height="155"
						action="https://recruit-api.xujiekeji.com/recruit-server/app/file/upload" :auto-upload="true"
						@on-remove="onRemove1" :file-list="fileList1" @on-success="successUpload1">
					</u-upload>
					<!-- <u-upload :max-count="5" upload-text="选择图片" :action="action" :file-list="fileList"></u-upload> -->
				</view>

			</view>
		</view>


		<u-calendar max-date="2199-01-01" v-model="showDate" @change='dateChange' :mode="mode"></u-calendar>
		<view style="height: 150rpx;width: 100%;"></view>
		<view class="footer">
			<view class="f" v-show='typeVal1'>
				<u-button shape="circle" type="primary" @click="submit">提交</u-button>
			</view>
			<view class="f" v-show='typeVal2'>
				<u-button shape="circle" type="primary" @click="edit(lgUserId)">修改</u-button>
			</view>
		</view>
		<u-select v-model="show" @confirm="confirm" :list="listSelect"></u-select>
		<u-popup @close='chageClose' v-model="showTk" :closeable="false" mode="bottom" border-radius="14">
			<view class="gzlxTk">
				
				<view class="title_content">
					<view></view>
					<view style="text-align: center;">工种类型</view>
					<view style="text-align: right;">
						<u-button style="margin-right:20rpx;" size="mini" type="primary" @click='ok'>确定</u-button>
					</view>
				</view>
			
				<view class="Fpart" v-for="item in gzlxList">
					<view class="sonTile" >
						<view class="" style="font-size: 16px; font-weight: bold;">{{item.name}}</view>
						<view class="" style="color: gray;"  @click='chageClose1(item)'>清空</view>
					</view>
					<view class="sonItem" >
						<view class="item_gz" :class="{active:arr.indexOf(sonItem.name)>-1}" @click="lxClick(sonItem.name)" v-for="sonItem in item.children">{{sonItem.name}}</view>
						
					</view>
					
				</view>
				
				
				
				<!-- <view class="">工种类型</view>
				<view class="item_gz">上面厨师</view> -->
				<!-- <view class="item_gz" :class="{active:arr.indexOf(item.value)>-1}" @click="lxClick(item.value)"
					v-for="(item,index) in gzlxList">
					{{item.dict_label}}
				</view> -->
				<view style="width: 100%;height: 100rpx"></view>
			</view>

		</u-popup>
	</view>
</template>

<script>
	import api from '../../../../api/routes.js'
 // import {gcj02_to_wgs84} from "../../../../components/citys/Winglau14-lotusAddress/wgs84_to_gcj02";
	export default {
		onReady() {
					this.$refs.uForm.setRules(this.rules);
				},

		data() {
			return {
				isGrrz:false,
				isQyrz:false,
				scShow:true,//选择视频组件
				spShow:false,//展示视频组件
				mode: 'date',
				showDate:false,
				arr: [],
				showTk: false,
				stageName: '',
				age:"", //年龄
				sex:"", //性别
				lgUserId:'',//我是零工-我的发布id
				info:{},
				form: {
					"infoType": "", //发布类型 : 求职 / 招工
					"stageId": '', //企业ID
					"workType": "", //工种类型,多个使用英文逗号分隔
					"workName": "", // 工作名称
					"wages": "", //薪资待遇
					"settlement": "", //结算方式
					"province": "", //位置-省
					"city": "", //位置-市
					"area": "", //位置-区
					"address": "", ////位置-详细地址
					"lgt": "", //经度
					"lat": "", //纬度
					"description": "", // 服务描述、工作内容
					"videoUrl": "", //视频地址(单个)
					"imgUrls": "", //图片地址,多个
					"createType": '', //创建类型: 个人  / 企业
					"needNum": "", //(招工人数) 类型为招工时
					"expireTime": "", //岗位到期日期  (类型为招工时)
					"workExp":"",//工作经验
					"price":'',//薪资数字
					"unit":'',//薪资单位
				},

				valueType: '',
				type: '',
				listSelect: [],
				show: false,
				list1: [

				],
				list3: [],
				gzlxList: [],
				list4: [
					{
						value: '1',
						label: '日结'
					},
					{
						value: '2',
						label: '周结'
					},
					{
						value: '3',
						label: '月结'
					},
					{
						value: '4',
						label: '按件'
					},
					{
						value: '4',
						label: '按单'
					},
					{
						value: '4',
						label: '按次'
					},
				],
				list5: [],
				list6: [],
				list7:[
					{
						value: '1',
						label: '不限'
					},
					{
						value: '2',
						label: '1-3年'
					},
					{
						value: '3',
						label: '4-6年'
					},
					{
						value: '4',
						label: '7年以上'
					},
				],
				list8:[
					{
						value: '1',
						label: '元/天'
					},
					{
						value: '2',
						label: '元/月'
					},
					{
						value: '3',
						label: '元/件'
					},
					{
						value: '4',
						label: '元/时'
					},
					{
						value: '5',
						label: '元/趟'
					},
					{
						value: '6',
						label: '元/单'
					},
				],
				value: '',
				list: [{
					name: '个人发布'
				},
				// {
				// 	name: '企业发布'
				// },

				],
				current: 0,
				fileList2: [],
				fileList22: [],

				fileList1: [],
				fileList11: [],

				grInfo:{},
				qyInfo:{},
				rules: {
					// stageName: [{
					// 	required: true,
					// 	message: '请选择所属企业',
					// 	trigger: ['change','blur'],
					// },],
					workType: [{
						required: true,
						message: '请选择工种类型',
						trigger: ['change','blur'],
					},],
					workName: [{
						required: true,
						message: '请输入岗位名称',
						trigger: ['change','blur'],
					},],
					wages: [{
						required: true,
						message: '请输入薪资待遇',
						trigger: ['change','blur'],
					},],
					workExp: [{
						required: true,
						message: '请选择工作经验',
						trigger: ['change','blur'],
					},],
					address: [{
						required: true,
						message: '请选择所在位置',
						trigger: ['change','blur'],
					},],
					description: [{
						required: true,
						message: '请输入服务描述',
						trigger: ['change','blur'],
					},],
					settlement: [{
						required: true,
						message: '请选择结算方式',
						trigger: ['change','blur'],
					},],



				},
			};
		},

		async onLoad(options) {
			console.log(this.form,3232);
			console.log(options.type,9595)
			wx.setNavigationBarTitle({
					title: '求职信息'
				})

			//求职、招工 两个类型
			// if (options.type1 == '求职') {
			// 	wx.setNavigationBarTitle({
			// 		title: '求职信息'
			// 	})
			// }
			this.type = options.type
			
			// if(this.type=='修改'&& this.info.video_url!==''){
			// 	this.spShow=true;
			// 	this.scShow=false;
			// }else{
			// 	return;
			// }
			this.getAuthentication('个人')
			this.getyz()
			this.xzdy()
			this.gzlx()
			this.lgUserId=options.id
				if(options.id){
					console.log(this.lgUserId,"修改12")
					// this.getModifyList()

					// 修改回填数据
					const res = await this.$myRequest({
						url: api.lgInfoDetail+'?id='+this.lgUserId,
						method: "GET",
						data: {
						},
					});
					console.log(res,)
					if (res.data.code == 0) {
						wx.hideLoading()

						let info = res.data.info;
						this.form.price=info.wages.split(",")[0]
						this.form.unit=info.wages.split(",")[1]
						console.log(this.form.price,this.form.unit,'this.form.price');
						this.form.id = info.id;
						this.stageName=info.stage_name;
						this.form.workType=info.work_type;
						this.form.workName=info.work_name;
						// this.form.wages=info.wages;
						this.form.workExp=info.work_exp;
						this.form.settlement=info.settlement;
						this.form.needNum=info.needNum;
						this.form.expireTime=info.expireTime;
						this.form.address=info.address;
						this.form.description=info.description;
						this.form.imgUrls=info.img_urls;
						this.form.videoUrl=info.video_url;

						if(res.data.info.img_urls){
							this.fileList1 = res.data.info.img_urls.split(',').map(e=>{
								return{
									url:e
								}
							})
							
							for (let i=0; i < this.fileList1.length; i++) {
							               let temp=this.fileList1[i].url
							               if((this.fileList11.indexOf(temp))==-1){
							                this.fileList11.push(temp)
							               }
							}
							console.log(this.fileList11,'this.fileList221');
						}
						if(res.data.info.video_url){
							if(this.type=='修改'){
								this.spShow=true;
								this.scShow=false;
							}else{
								return
							}
							this.form.videoUrl=info.video_url;

						}else{
							if(this.type=='修改'){
								this.spShow=false;
								this.scShow=true;
							}else{
								return
							}
						}
						this.info = res.data.info
						
					} else {
						wx.showToast({
							title: '查询失败',
							icon: 'none'
						})
					}
			}
			this.getStationList();//获取企业列表
			this.classification();//获取工种类型


		},
		computed:{
			xgShow(){
				if(this.lgUserId){
					return false
				}else{
					return true
				}

			},

		},

		methods: {
			async classification(){
					const res = await this.$myRequest({
						url: api.classificationGrid,
						method: "GET",
						data: {
							parentId:0,
							businessId:3
						},
					});
					if(res.data.code==0){
						this.gzlxList=res.data.list;
					}
					console.log(this.gzlxList,'工种类型');
				},
			uploadVideo(){
				var self = this;
							uni.chooseVideo({
								sourceType: ['camera', 'album'],
								success: function (res) {
									console.log(res.tempFilePath,'选择视频成功');
									uni.uploadFile({
												url: 'https://recruit-api.xujiekeji.com/recruit-server/app/file/upload', //仅为示例，非真实的接口地址
												filePath: res.tempFilePath,
												name: 'file',
												success: (uploadFileRes) => {
													console.log(uploadFileRes,"上传视频成功");
													let data =JSON.parse(uploadFileRes.data) ;
													self.form.videoUrl=data.url;
													self.scShow=false;
													self.spShow=true;
												}
									});

								}
							});

			},
			delVideo(){
				uni.showModal({
					title: '提示',
					content: '是否要删除此视频',
					success: res => {
					console.log(this.form,"删除成功");
					if(res.confirm){
						this.form.videoUrl='';
						this.scShow=true;
						this.spShow=false;
						wx.showToast({
							title: '删除成功',
							icon: 'none'
						})
					}
					console.log(this.form.videoUrl,"删除成功11");
					}

					});

				console.log("删除视频");
			},
			// 修改
			async edit(id){
				const res2 = await this.$myRequest({
					url: api.modify,
					method: "POST",
					 data:{
						id:id,
						infoType:'求职', //发布类型 : 求职 / 招工
						stageId:this.form.stageId, //企业ID
						workType:this.form.workType, //工种类型,多个使用英文逗号分隔
						workName:this.form.workName, // 工作名称
						workExp:this.form.workExp, // 工作经验
						wages:this.form.price + ','+this.form.unit, //薪资待遇
						settlement:this.form.settlement, //结算方式
						province:this.form.province, //位置-省
						city:this.form.city,//位置-市
						area:this.form.area,//位置-区
						address:this.form.address, ////位置-详细地址
						lgt:this.form.lgt, //经度
						lat:this.form.lat,//纬度
						description:this.form.description,  // 服务描述、工作内容
						videoUrl:this.form.videoUrl, //视频地址(单个)
						imgUrls:this.form.imgUrls, //图片地址,多个
						createType:'个人', //创建类型: 个人  / 企业

					},

				});
				this.form=res2.data.dto;
				wx.showToast({
					title: '修改成功',
					icon: 'none'
				})
				
				setTimeout(() => {
					wx.navigateBack({
					  delta: 1
					})
					wx.hideLoading()
				}, 1500)
				// 调用父组件方法刷新
				// uni.$emit('updateData', '')
				
				
			},
			async getAuthentication(val){
				wx.showLoading()
				const res = await this.$myRequest({
					url: api.getAuthentication,
					method: "GET",
				});
				console.log(res,2323);
				if (res.data.code == 0) {
					console.log(res.data.member,'获取认证')
					let  certNo = res.data.member.certNo
					let  certName = res.data.member.certName
					if(val=='个人'){
						if(!certName||!certNo){
							wx.showToast({
								title: '你还没有进行个人认证',
								icon: 'none'
							})
							this.isGrrz = false
						}else{
							this.value = res.data.member.tell
							this.grInfo = res.data.member
							this.isGrrz = true
							console.log(certNo,55);
							this.age = this.getIdCardInfo(certNo, 3)
							this.sex = this.getIdCardInfo(certNo, 2)

						}
					}else{
						if(res.data.company==null){
							wx.showToast({
								title: '你还没有进行企业认证',
								icon: 'none'
							})
							setTimeout(()=>{
								uni.navigateTo({
									url: '/package/pages/searchJob/other/shimingrenzheng',
								});
							},1000)
							this.isQyrz = false
						}else{
							this.qyInfo = res.data.company
							this.isQyrz = true
						}
					}


					setTimeout(() => {
						wx.hideLoading()
					}, 2000)
				} else {
					wx.showToast({
						title: '获取认证失败',
						icon: 'none'
					})
				}
			},
			dateChange(val){
				console.log(val.result+" 23:59:59")
				this.form.expireTime = val.result+" 23:59:59"
			},
			selectDate(){
				this.showDate = true
			},
			// 上传视频
			// 移除图片时触发
			// onRemove2(index) {
			// 	this.fileList22.splice(index, 1);
			// 	this.form.videoUrl = this.fileList22.toString()
			// },
			// 图片上传成功时触发
			successUpload2(data, index, lists, name) {
				let url = data.url;
				this.fileList22.push(url);
				console.log(this.fileList22)
				this.form.videoUrl = this.fileList22.toString()
				// this.form.fileList2 = JSON.stringify(this.fileList22);
			},

			// 上传图片
			onRemove1(index) {
				this.fileList11.splice(index, 1);
				this.form.imgUrls = this.fileList11.toString()
			},
			successUpload1(data, index, lists, name) {
				let url = data.url;
				
				this.fileList11.push(url);
				this.form.imgUrls = this.fileList11.toString()
				console.log(this.fileList11,"上传成功");
				// this.form.fileList2 = JSON.stringify(this.fileList22);
			},
		submit() {
			if (this.form.price=='') {
			    uni.showToast({
			      icon: "none",
			      title: "薪资待遇不能为空",
			    });
			    return;
			}
			if (this.form.unit=='') {
			    uni.showToast({
			      icon: "none",
			      title: "薪资待遇不能为空",
			    });
			    return;
			}
			
			
			this.$refs.uForm.validate(valid => {
			if (valid) {
			this.form.createType = this.current == 0 ? '个人' : '企业'
			this.form.infoType = this.type
			wx.showLoading()
			console.log(this.form,'求职this.form');
			this.$myRequest({
				url: api.saveOrUpdateLg,
				method: "POST",
				data:this.form
			}).then(res => {
				console.log(res,'打印res')
				console.log(res.data,'打印res.data')
				if (res.data.code == 0) {
					wx.showToast({
						title: '添加成功',
						icon: 'none'
					})
					setTimeout(() => {
						wx.navigateBack({
						  delta: 1
						})
						wx.hideLoading()
					}, 1000)
				} else {
					wx.showToast({
						title: '添加失败',
						icon: 'none'
					})
				}

			})
			}
			})
		},
			ok() {
				this.form.workType = this.arr.toString()
				this.showTk = false
			},
			selectGz() {
				if(this.form.workType!=''){
					
					this.arr = this.form.workType.split(',')
				}
				console.log(this.arr,"---this.arr")
				this.showTk = true
			},
			chageClose() {
				this.arr = []
			},
			chageClose1(name) {
				
				let nArr = [];
				for (var i = 0; i < this.arr.length; i++) {
					 let temp = this.arr[i];
					 let c1 = name.children.map((item,index) =>{
					           return item.name
					 })
					 
					// indexOf没有找到返回-1,否则大于-1
					 if(!(c1.indexOf(temp)>-1)){
						nArr.push(temp) 
					 }
				}	
				this.arr = nArr;
				
			},
			lxClick(val) {
				if (this.arr.indexOf(val) > -1) {
					var index = this.arr.indexOf(val)
					this.arr.splice(index, 1);
				} else {
					this.arr.push(val)
				}
				console.log(val,'valval2');
				console.log(this.arr,'arr22');

			},
			async getyz() {
				const res = await this.$myRequest({
					url: api.allStageList,
					method: "GET",
				});
				if (res.data.code == 0) {
					console.log(res)
					res.data.list.forEach(item => {
						item.label = item.name
						item.value = item.id
					})
					this.list1 = res.data.list
					setTimeout(() => {
						wx.hideLoading()
					}, 2000)
				} else {
					wx.showToast({
						title: '查询失败',
						icon: 'none'
					})
				}
			},
			async xzdy() {
				const res = await this.$myRequest({
					url: api.dictionary1,
					method: "GET",
				});
				if (res.data.code == 0) {
					console.log(res)
					res.data.list.forEach(item => {
						item.label = item.dict_label
						item.value = item.dict_label
					})
					this.list3 = res.data.list
					setTimeout(() => {
						wx.hideLoading()
					}, 2000)
				} else {
					wx.showToast({
						title: '查询失败',
						icon: 'none'
					})
				}
			},
			async gzlx() {
				const res = await this.$myRequest({
					url: api.dictionary2,
					method: "GET",
				});
				console.log(res.data,98520);
				if (res.data.code == 0) {
					console.log(res)
					res.data.list.forEach(item => {
						item.label = item.dict_label
						item.value = item.dict_label
					})
					// this.gzlxList = res.data.list
					setTimeout(() => {
						wx.hideLoading()
					}, 2000)
				} else {
					wx.showToast({
						title: '查询失败',
						icon: 'none'
					})
				}
			},
			chooseAddress() {
				var _this = this;
				wx.chooseLocation({
					success: (res) => {
						
						var reg = /.+?(省|市|自治区|自治州|县|区)/g;
						        let myLocation = res.address.match(reg);
						        let provinceName = '';
						        let cityName = '';
						        let countryName = '';
						        if (myLocation != undefined && myLocation != null) {
						          provinceName = myLocation[0];
						          cityName = myLocation[1];
						          countryName = myLocation[2];
						        }
								
								this.form.province=provinceName;
								this.form.city=cityName;
								this.form.area=countryName;
						      console.log(provinceName,cityName,countryName);
						
						this.form.address = res.address+res.name
						this.form.lat = res.latitude
						this.form.lgt = res.longitude
						var name = res.name
						var latitude = res.latitude
						var longitude = res.longitude
					}
				})

			},
			confirm(val) {
				let value = val[0].value
				let label = val[0].label
				if (this.valueType == 1) {
					this.stageName = label
					this.form.stageId = value
				} else if (this.valueType == 3) {
					this.form.wages = label
				} else if (this.valueType == 4) {
					this.form.settlement = label
				}else if (this.valueType == 6) {
					this.form.workExp = label
				}else if (this.valueType == 7) {
					this.form.unit = label
					this.form.wages=this.form.price + ","+ this.form.unit
				}
			},
			showSelect(val) {
				console.log(val)
				this.valueType = val
				if(val==1){
					this.listSelect = this.list6
				}else if (val == 3) {
					this.listSelect = this.list3
				} else if (val == 4) {
					this.listSelect = this.list4
				} else if (val == 5) {
					this.listSelect = this.list5
				}else if (val == 6) {
					this.listSelect = this.list7
				}else if(val==7){
					this.listSelect = this.list8
					this.form.wages=this.form.price + ","+ this.form.unit
					console.log(this.form.wages,'')
					
				}
				this.show = true
			},
			// 获取企业列表
			getStationList(){
				this.$myRequest({
					url: api.nearbyStation,
					method: "POST",
					data:{
						"page":1, //页码
						"limit":1000, //取多少条
						"lgt":wx.getStorageSync('nowLgt'), //当前用户经度
						"lat":wx.getStorageSync('nowLat'), //当前用户纬度
					},
				}).then(res=>{
					let yzNameList=res.data.page.list.map(s=>{
						return{
							value: s.id,
							label: s.name,
						}
					})
					this.list6=yzNameList;
				})
			},
			change(index) {
				if(index==1){
					this.getAuthentication('企业')
				}else{
					this.getAuthentication('个人')
				}
				this.current = index;
			},
			goGuzhu() {
				uni.navigateTo({
					url: '/package/pages/searchJob/other/woshiguzhu',
				});
			},
			goLinggong() {
				uni.navigateTo({
					url: '/package/pages/searchJob/other/woshilinggong',
				});
			},
			lgRegister() {
				uni.navigateTo({
					url: '/package/pages/components/lingGonRegister',
				});
			},
			// 判断性别年龄
			getIdCardInfo(UUserCard, num) {
				if (num == 1) {
					//获取出生日期
					var birth = UUserCard.substring(6, 10) + "-" + UUserCard.substring(10, 12) + "-" + UUserCard.substring(
						12, 14);
					return birth;
				}
				if (num == 2) {
					//获取性别
					if (parseInt(UUserCard.substr(16, 1)) % 2 == 1) {
						//男
						return "男";
					} else {
						//女
						return "女";
					}
				}
				if (num == 3) {
					//获取年龄
					var myDate = new Date();
					var month = myDate.getMonth() + 1;
					var day = myDate.getDate();
					var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1;
					if (UUserCard.substring(10, 12) < month || UUserCard.substring(10, 12) == month && UUserCard.substring(
						12, 14) <= day) {
						age++;
					}
					return age;
				}
			},




		},

		computed:{
			typeVal1(){
				if(this.type=='求职'){
					return true
				}else{
					return false
				}
			},
			typeVal2(){
				if(this.type=='修改'){
					return true
				}else{
					return false
				}
			}
		}
	};
</script>

<!-- <style>
/* #ifndef H5 */
page {
  height: 100%;
  background-color: #f2f2f2;
}

/* #endif */
</style> -->

<style lang="scss" scoped>
	.main1 {
		background: rgb(243, 245, 250);

		.footer {
			display: flex;
			align-items: center;
			z-index: 999;

			.f {
				width: 90%;
				margin-left: 5%;
			}

			position: fixed;
			bottom: 0;
			height: 120rpx;
			background: white;
			width: 100%;
		}

		.geren {
			.qzxx {
				box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
				width: 90%;
				margin-left: 5%;
				background: white;
				border-radius: 6px;
				margin-top: 20rpx;
				padding-top: 20rpx;
				padding-bottom: 20rpx;

				.form {
					width: 90%;
					margin-left: 20rpx;
				}

				.title {
					margin-left: 20rpx;
				}
			}

			.info {
				box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
				width: 90%;
				margin-left: 5%;
				background: white;
				border-radius: 6px;
				min-height: 280rpx;
				margin-top: 30rpx;
				padding-top: 20rpx;

				.tel {
					width: 94%;
					margin-left: 3%;
					display: flex;
					align-items: center;
					border-radius: 4px;
					height: 70rpx;
					margin-top: 45rpx;
					background: rgb(224, 230, 241);

					.icon {
						margin-left: 20rpx;
					}
				}

				.userInfo {
					display: flex;
					justify-content: space-between;
					align-items: center;

					.left {
						display: flex;
						flex-direction: column;
						margin-left: 20rpx;

						.name {
							font-size: 32rpx;
							font-family: Arial, Helvetica, sans-serif;
							font-weight: bold;
						}
					}

					.right {
						image {
							margin-right: 20rpx;
							height: 100rpx;
							width: 100rpx;
						}
					}
				}
			}
		}
	}

	.title_content {
		display: flex;
		justify-content: space-evenly;
		align-items: center;
		height: 100rpx;
		width: 100%;
		box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
		position: fixed;
		top:0px;
		background: #ffffff;

		view {
			width: 33%;
			// border: 1px solid red;
		}
	}

	.gzlxTk {
		height: 900rpx;
		padding-top: 50px;
		// display: flex;
		// flex-wrap: wrap;
		// padding-bottom: 30rpx;

		.active {
			width: 30%;
			height: 80rpx;
			// border: 1px solid #67B2E9;
			background: #1684fd !important;
			margin-left: 2.5%;
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 26rpx;
			color: #ffffff !important;
			margin-bottom: 20rpx;
		}

		.item_gz {
			width: 30%;
			height: 80rpx;
			// border: 1px solid #67B2E9;
			background: #EBEEF5;
			margin-left: 2.5%;
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 26rpx;
			color: #606266;
			margin-bottom: 20rpx;
		}
		.Fpart{
			margin: 0 10px;
			// padding-top: 50px;
		}
		.sonTile{
			display: flex;
			justify-content: space-between;
			line-height: 40px;
		}
		.sonItem{
			display: flex;
			flex-wrap: wrap;
		}
	}
	.ageOrSex{
		margin-top: 12px;
		color: gray;
		.age{
			margin-right: 8px;
		}


	}
	.upload1{
		width: 150rpx;
		height: 150rpx;
		text-align: center;
		border-radius: 14rpx;
		background: #F4F5F6;
		margin: 10rpx;
		// display: flex;
		// flex-direction: column;
		// justify-content: center;
		// align-items: center;
		image{
			width: 50rpx;
			height: 50rpx;
			padding-top: 20rpx;
		}
		.upText{
			font-size: 26rpx;
			line-height: 50rpx;
			color: #606266;

		}
	}
	.videoVie{
		position: relative;
		margin-top: 20rpx;
		width:100%;
		image{
			width: 70rpx;
			height:70rpx;
			position: absolute;
			top: 10rpx;
			right: 40rpx;
		}
	}
	.wagesDiv{
		display: flex;
		position: absolute;
	}
</style>
